package com.gutai.admin.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.gutai.admin.entity.User;

/**
 * 
 * 描述：
 * 
 * <pre>
 * HISTORY
 * ****************************************************************************
 *  ID    DATE            PERSON            REASON
 *  1     2018年11月7日         YC           Create
 * ****************************************************************************
 * </pre>
 * 
 * @author YC
 * @version 1.0
 */
public interface IUserDao extends JpaRepository<User, Integer>, CustomJpaRepository<User> {

    public List<User> findByUsername(String username);

//    @Query("select t1.id as id, t1.couponId as couponId, t1.couponNumber as couponNumber, t1.orderId as orderId, t1.usedTime as usedTime, t1.userId as userId, t2.nickname as userName, t3.name as couponName "
//            + "from UserCoupon t1, User t2, Coupon t3 where t1.userId=?1 and t1.userId= t2.id and t1.couponId=t3.id")
//    public List<UserCouponDto> findCouponsByUserId(int id);
}
